package adv7;

public class Customer implements Comparable<Customer>{
    private String no,name,phone;
    private int jifen;

    public Customer(){};

    public Customer(String no, String name, String phone, int jifen) {
        this.no = no;
        this.name = name;
        this.phone = phone;
        this.jifen = jifen;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getJifen() {
        return jifen;
    }

    public void setJifen(int jifen) {
        this.jifen = jifen;
    }
    @Override
    public int compareTo(Customer o) {
        return (int)(this.jifen-o.jifen);
    }
}
